﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {
    import org.aswing.plaf.*;
    import org.aswing.error.*;

    public class LookAndFeel {

        public static function installBasicProperties(_arg1:Component, _arg2:String, _arg3:String="opaque", _arg4:String="focusable"):void{
            if (!_arg1.isOpaqueSet()){
                _arg1.setOpaque(_arg1.getUI().getBoolean((_arg2 + _arg3)));
                _arg1.setOpaqueSet(false);
            };
            if (!_arg1.isFocusableSet()){
                _arg1.setFocusable(_arg1.getUI().getBoolean((_arg2 + _arg4)));
                _arg1.setFocusableSet(false);
            };
        }
        public static function installColors(_arg1:Component, _arg2:String, _arg3:String="background", _arg4:String="foreground", _arg5:String="mideground"):void{
            var _local6:ASColor = _arg1.getBackground();
            if ((((_local6 == null)) || ((_local6 is UIResource)))){
                _arg1.setBackground(_arg1.getUI().getColor((_arg2 + _arg3)));
            };
            var _local7:ASColor = _arg1.getForeground();
            if ((((_local7 == null)) || ((_local7 is UIResource)))){
                _arg1.setForeground(_arg1.getUI().getColor((_arg2 + _arg4)));
            };
            var _local8:ASColor = _arg1.getMideground();
            if ((((_local8 == null)) || ((_local8 is UIResource)))){
                _arg1.setMideground(_arg1.getUI().getColor((_arg2 + _arg5)));
            };
        }
        public static function installStyleTune(_arg1:Component, _arg2:String, _arg3:String="colorAdjust"):void{
            var _local4:StyleTune = _arg1.getStyleTune();
            if ((((_local4 == null)) || ((_local4 is UIResource)))){
                _arg1.setStyleTune(_arg1.getUI().getStyleTune((_arg2 + _arg3)));
            };
        }
        public static function installFont(_arg1:Component, _arg2:String, _arg3:String="font"):void{
            var _local4:ASFont = _arg1.getFont();
            if ((((_local4 == null)) || ((_local4 is UIResource)))){
                _arg1.setFont(_arg1.getUI().getFont((_arg2 + _arg3)));
            };
        }
        public static function installColorsAndFont(_arg1:Component, _arg2:String, _arg3:String="background", _arg4:String="foreground", _arg5:String="font", _arg6:String="mideground", _arg7:String="colorAdjust"):void{
            installColors(_arg1, _arg2, _arg3, _arg4, _arg6);
            installFont(_arg1, _arg2, _arg5);
            installStyleTune(_arg1, _arg2, _arg7);
        }
        public static function installBorderAndBFDecorators(_arg1:Component, _arg2:String, _arg3:String="border", _arg4:String="bg", _arg5:String="fg"):void{
            var _local6:Border = _arg1.getBorder();
            if ((_local6 is UIResource)){
                _arg1.setBorder(_arg1.getUI().getBorder((_arg2 + _arg3)));
            };
            var _local7:GroundDecorator = _arg1.getBackgroundDecorator();
            if ((_local7 is UIResource)){
                _arg1.setBackgroundDecorator(_arg1.getUI().getGroundDecorator((_arg2 + _arg4)));
            };
            var _local8:GroundDecorator = _arg1.getForegroundDecorator();
            if ((_local8 is UIResource)){
                _arg1.setForegroundDecorator(_arg1.getUI().getGroundDecorator((_arg2 + _arg5)));
            };
        }
        public static function uninstallBorderAndBFDecorators(_arg1:Component):void{
            if ((_arg1.getBorder() is UIResource)){
                _arg1.setBorder(DefaultEmptyDecoraterResource.INSTANCE);
            };
            if ((_arg1.getBackgroundDecorator() is UIResource)){
                _arg1.setBackgroundDecorator(DefaultEmptyDecoraterResource.INSTANCE);
            };
            if ((_arg1.getForegroundDecorator() is UIResource)){
                _arg1.setForegroundDecorator(DefaultEmptyDecoraterResource.INSTANCE);
            };
        }

        public function getDefaults():UIDefaults{
            throw (new ImpMissError());
        }

    }
}//package org.aswing 
